package com.zorn.platform.role.action;

import com.zorn.core.provider.ActionSupportProvider;
import com.zorn.platform.role.service.IRoleService;

public class RoleAction extends ActionSupportProvider {

	/* Fields
	================================================== */
	private IRoleService roleService;

	/* Methods
	================================================== */
	public String query() {
		roleService.query(getParameterMap());

		setJSONObject(roleService.getResult());

		return JSON_RESULT;
	}

	public String count() {
		roleService.count(getParameterMap());

		setJSONObject(roleService.getResult());

		return JSON_RESULT;
	}

	public String insert() {
		roleService.insert(getParameterMap());

		setJSONObject(roleService.getResult());

		return JSON_RESULT;
	}

	public String update() {
		roleService.update(getParameterMap());

		setJSONObject(roleService.getResult());

		return JSON_RESULT;
	}

	public String delete() {
		roleService.delete(getParameterMap());

		setJSONObject(roleService.getResult());

		return JSON_RESULT;
	}

	/* Getters & Setters
	================================================== */
	public void setRoleService(IRoleService roleService) {
		this.roleService = roleService;
	}

}